/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package model;

/**
 *
 * @author LUIS
 */
import java.util.ArrayList;
//import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
//import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlTransient;
//import javax.xml.bind.annotation.XmlType;

@XmlRootElement
public class Map {
	@XmlTransient
	private int row;
	@XmlTransient
	private int column;
	@XmlTransient
	private Cell matrix[][];
	@XmlElement(name="Cell")
	private ArrayList<Cell> arrCell=new ArrayList<Cell>();
	
	public Map(){}
	public Map(int x, int y){
		column=y;
		row=x;
		matrix = new Cell [x][y] ;
		for(int i=0;i<x;i++){
			for(int j=0;j<y;j++){
				matrix[i][j]=new Cell(i,j);
			}
		}
	}
	
	
	public int getRow() {
		return row;
	}
	
	public void setRow(int row) {
		this.row = row;
	}
	
	public int getColumn() {
		return column;
	}
	
	public void setColumn(int column) {
		this.column = column;
	}
	
	public Cell[][] getMatrix() {
		return matrix;
	}
	
	
	public void setMatrix(Cell[][] matrix) {
		this.matrix = matrix;
	}
	
	public Cell getCell(int x, int y){
		return matrix[x][y];
	}
	
	public void setCell(int x,int y,Cell cell){
		matrix[x][y]=cell;
	}
	
	
}

